<?php defined('BASEPATH') or die('access restricted!');


/**
 * Bash site lib
 *
 * 
 * PHP versions 4 and 5
 *
 */
class Bashlib
{

/*
|--------------------------------------------------------------------------
|  out lvs ip list option;
|--------------------------------------------------------------------------
|
| lvs list info page;.
| 
|
*/	
	public function OUTLVSIP($lvsip)
	{             
                $CI =& get_instance();
		$CI->load->model('admin_model');
		$results= $CI->admin_model->get_lvsip_results();
		foreach($results->result() as $myrow)
		{
		        if ($lvsip==$myrow->wip)
			        echo "		<option value=".$myrow->wip." selected>".$myrow->wip."</option>\n";
			else
				echo "		<option value=".$myrow->wip.">".$myrow->wip."</option>\n";
			
		}
	}


/*
|--------------------------------------------------------------------------
|  out vip ip list option;
|--------------------------------------------------------------------------
|
| lvs vip info page;.
| 
|
*/	
	public function OUTVIPIP($vipip)
	{             
                $CI =& get_instance();
		$CI->load->model('admin_model');
		$results= $CI->admin_model->get_vipip_results();
		foreach($results->result() as $myrow)
		{
		        if ($vipip==$myrow->virtual_ipaddress)
			        echo "		<option value=".$myrow->virtual_ipaddress." selected>".$myrow->virtual_ipaddress."</option>\n";
			else
				echo "		<option value=".$myrow->virtual_ipaddress.">".$myrow->virtual_ipaddress."</option>\n";
			
		}
	}

/*
|--------------------------------------------------------------------------
|  out monitors ip list option;
|--------------------------------------------------------------------------
|
| lvs vip info page;.
| 
|
*/	
	public function OUTMmonitors($monitors)
	{             
                $CI =& get_instance();
		$CI->load->model('admin_model');
		$results= $CI->admin_model->get_monitors_par();
		foreach($results->result() as $myrow)
		{
		        if ($monitors==$myrow->monitors_name)
			        echo "		<option value=".$myrow->monitors_name." selected>".$myrow->monitors_name."</option>\n";
			else
				echo "		<option value=".$myrow->monitors_name.">".$myrow->monitors_name."</option>\n";
			
		}
	}
}

?>